package gui;

import javax.swing.JPanel;
import javax.swing.JLabel;

import java.awt.Font;
import java.awt.event.ActionListener;

import javax.swing.JEditorPane;
import javax.swing.JTextField;
import javax.swing.JButton;

public class Transfer extends JPanel {

	private JButton btnContinue;
	private JButton btnBack;
	private JEditorPane currentBalance;
	private JTextField transferAmount;
	private JTextField transferRecipient;

	/**
	 * Create the panel.
	 */
	public Transfer() {
		setLayout(null);

		JLabel lblTransferBitcoins = new JLabel("Transfer bitcoins");
		lblTransferBitcoins.setFont(new Font("Tahoma", Font.BOLD, 13));
		lblTransferBitcoins.setBounds(170, 22, 109, 16);
		add(lblTransferBitcoins);

		JLabel lblNewLabel = new JLabel("Current balance: ");
		lblNewLabel.setBounds(72, 74, 84, 14);
		add(lblNewLabel);

		JLabel lblTransferAmount = new JLabel("Transfer amount");
		lblTransferAmount.setBounds(72, 117, 80, 14);
		add(lblTransferAmount);

		JLabel lblRecipient = new JLabel("Desired recipient: ");
		lblRecipient.setBounds(72, 161, 87, 14);
		add(lblRecipient);

		currentBalance = new JEditorPane();
		currentBalance.setBounds(166, 68, 106, 20);
		add(currentBalance);

		transferAmount = new JTextField();
		transferAmount.setBounds(166, 114, 106, 20);
		add(transferAmount);
		transferAmount.setColumns(10);

		transferRecipient = new JTextField();
		transferRecipient.setColumns(10);
		transferRecipient.setBounds(166, 158, 106, 20);
		add(transferRecipient);

		btnBack = new JButton("Back");
		btnBack.setBounds(63, 219, 89, 23);
		add(btnBack);

		btnContinue = new JButton("Continue");
		btnContinue.setBounds(299, 219, 89, 23);
		add(btnContinue);

		JLabel lblNewLabel_1 = new JLabel("remember @");
		lblNewLabel_1.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblNewLabel_1.setBounds(282, 162, 57, 13);
		add(lblNewLabel_1);

		JLabel lblInBitcoins = new JLabel("bitcoins");
		lblInBitcoins.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblInBitcoins.setBounds(282, 118, 57, 13);
		add(lblInBitcoins);

		JLabel lblBitcoins = new JLabel("bitcoins");
		lblBitcoins.setFont(new Font("Tahoma", Font.PLAIN, 10));
		lblBitcoins.setBounds(282, 74, 57, 13);
		add(lblBitcoins);

	}

	public void addActionListener(ActionListener l) {
		btnContinue.addActionListener(l);
		btnBack.addActionListener(l);

	}

	public JButton getBtnContinue() {
		return btnContinue;
	}

	public JButton getBtnBack() {
		return btnBack;
	}

	public JEditorPane getCurrentBalance() {
		return currentBalance;
	}

	public JTextField getTransferAmount() {
		return transferAmount;
	}

	public JTextField getTransferRecipient() {
		return transferRecipient;
	}

}
